package com.team.app.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.team.app.dao.ModelDao;
import com.team.app.model.Model;


@Service
public class ModelServiceImpl implements ModelService{
	@Autowired
    private ModelDao modelDao;     

	@Override
	@Transactional
	public Long create(Model obj) {
		// TODO Auto-generated method stub
		return modelDao.create(obj);
	}

	@Override
	@Transactional
	public void edit(Model obj) {
		// TODO Auto-generated method stub
		modelDao.edit(obj);
	}

	@Override
	@Transactional
	public void remove(Model obj) {
		// TODO Auto-generated method stub
		modelDao.remove(obj);
	}

	@Override
	@Transactional
	public Model find(Object id) {
		// TODO Auto-generated method stub
		return modelDao.find(id);
	}

	@Override
	@Transactional
	public List<Model> findAll() {
		// TODO Auto-generated method stub
		return modelDao.findAll();
	}

	@Override
	@Transactional
	public List<Model> findRange(int[] range) {
		// TODO Auto-generated method stub
		return modelDao.findRange(range);
	}

	@Override
	@Transactional
	public Long count() {
		// TODO Auto-generated method stub
		return modelDao.count();
	} 
}
